//
//  KYCacheManager.m
//  KYSignSDK
//
//  Created by 罗新 on 2017/11/14.
//  Copyright © 2017年 KuaiYan  Co.,LTD. All rights reserved.
//

#import "KYCacheManager.h"
#import "KYCache.h"
#define cacheName @"KYCache"
@implementation KYCacheManager
+ (instancetype)shareInstance{
    static KYCacheManager *manager;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manager = [[KYCacheManager alloc] init];
    });
    return manager;
}
- (void)ky_setObject:(id)object forKey:(NSString *)key{
    KYCache *cache = [KYCache cacheWithName:cacheName];
    [cache setObject:object forKey:key];
}
- (BOOL)ky_isContainObjectForKey:(NSString *)key{
    KYCache *cache = [KYCache cacheWithName:cacheName];
    return [cache containsObjectForKey:key];
}
- (id)ky_ObjectForKey:(NSString *)key{
    KYCache *cache = [KYCache cacheWithName:cacheName];
    return [cache objectForKey:key];
}
@end
